<?php
$user = User::current_user();
?>
<?php $this->extend('_layouts/default');?>
<?php $this->block('body');?>

<?php if (!$user) { ?>
  <div class="hero-unit">
    <h1>欢迎來到 Microblog</h1>
    <p>Microblog 是一個基于 php + redis 的微博系統。</p>
    <p>
      <a class="btn btn-primary btn-large" href="<?php echo url(ROUTE_HTML_APP, url_params('chap0','login'));?>">登陆</a>
      <a class="btn btn-large" href="<?php echo url(ROUTE_HTML_APP, url_params('chap0','reg'));?>">立即注册</a>
    </p>
  </div>
<?php } else { ?>
  <?php $this->element('say') ?> 
<?php } ?>
<?php $this->element('posts') ?>

<?php $this->endblock();?>
